<div class="form">

<?php $form=$this->beginWidget('CActiveForm', array(
	'id'=>'courses-form',
	'enableAjaxValidation'=>false,
//        'enableClientValidation' => true,
//        'clientOptions' => array(
//            'validateOnSubmit' => true,
//        ),
//        'htmlOptions' => array('enctype' => 'multipart/form-data')
)); ?>

	<table class="button-form"><tr>
			<td><span class="note">Thông tin bắt buộc <span class="required">*</span>.</span></td>
			<td align="right">
				<div class="row buttons"><?php echo CHtml::submitButton($model->isNewRecord ? 'Đăng kí' : 'Cập nhật'); ?></div>
			</td>
	</tr></table>
	<div class="row">
		<?php echo $form->labelEx($model,'id'); ?>
		<?php echo $form->textField($model,'id',array('size'=>60,'maxlength'=>4, 'class' => 'createCoursesNm', 'disabled' => ((!$model->isNewRecord) ?  'disabled' : null))); ?>
		<?php echo $form->error($model,'id'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'name'); ?>
		<?php echo $form->textField($model,'name',array('size'=>60,'maxlength'=>255, 'class' => 'coursesNm')); ?>
		<?php echo $form->error($model,'name'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'note'); ?>
		<?php echo $form->textArea($model,'note',array('rows'=>6, 'cols'=>70, 'class' => 'coursesNote')); ?>
		<?php echo $form->error($model,'note'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'status'); ?>
		<?php echo $form->dropDownList($model,'status',Util::itemAlias('UserStatus')); ?>
		<?php echo $form->error($model,'status'); ?>
	</div>

        <?php if (!$model->isNewRecord): ?>
        	<input type="hidden" name="update_id" value="<?php echo $model->id; ?>"/>
        <?php endif; ?>

	<table class="button-form"><tr>
			<td align="right">
				<div class="row buttons"><?php echo CHtml::submitButton($model->isNewRecord ? 'Đăng kí' : 'Cập nhật'); ?></div>
			</td>
	</tr></table>

<?php $this->endWidget(); ?>

</div><!-- form -->